package com.ty.user.starter.entity.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;

/**
 * 用户登录dto
 *
 * @author minku
 * @date 2021-10-18
 */
@Data
public class UserLoginDto implements Serializable {
    private static final long serialVersionUID = 8336865502693367046L;

    @ApiModelProperty("用户名")
    @NotBlank(message = "用户名不能为空")
    @Length(min = 6, max = 20, message = "用户名长度介于6~20位")
    private String username;

    @ApiModelProperty("密码")
    @NotBlank(message = "密码不能为空")
    @Length(min = 8, max = 20, message = "密码长度介于8~20位")
    private String password;
}
